package test5;

import java.util.Scanner;

public class TestGoods {
    public static void main(String[] args) {
        //创建商品对象
        Goods goods = new Goods();
        goods.show();//显示所有商品信息
        System.out.println("请输入您想要购买的商品id");
        Scanner sc = new Scanner(System.in);
        int id = sc.nextInt();
        System.out.println("请输入您要购买的数量");
        int num = sc.nextInt();
        goods.show(id,num);//显示所选商品信息总价
    }
}
